//
//  RecommendPicCell.m
//  AutoHome
//
//  Created by wqh on 15-5-10.
//  Copyright (c) 2015年 Wqh. All rights reserved.
//

#import "RecommendPicCell.h"

@implementation RecommendPicCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)showDataWithModel:(RecommendModel *)model {
    
    self.titleLabel.text = model.title;
    
    NSRange range = [model.indexdetail rangeOfString:@"http"];
    NSString *picDetailStr = [model.indexdetail substringFromIndex:range.location];
    NSArray *picArr = [picDetailStr componentsSeparatedByString:@","];
    [self.pic1 sd_setImageWithURL:[NSURL URLWithString:picArr[0]] placeholderImage:[UIImage imageNamed:@"default_80_60"]];
    [self.pic2 sd_setImageWithURL:[NSURL URLWithString:picArr[1]] placeholderImage:[UIImage imageNamed:@"default_80_60"]];
    [self.pic3 sd_setImageWithURL:[NSURL URLWithString:picArr[2]] placeholderImage:[UIImage imageNamed:@"default_80_60"]];
    
    self.timeLabel.text = model.time   ;
    self.replyCountLabel.text = [NSString stringWithFormat:@"%@图片",model.replycount.stringValue];
    
}

@end
